package de.hft_stuttgart.dsa.ctt.model;


public class MyCourse {

	private Course course;

	private int remainingNumberOfLectures;
	
	public MyCourse(Course course) {
		this.course = course;
		this.remainingNumberOfLectures = course.getNumberOfLectures();
	}

	public Course getCourse() {
		return course;
	}

	public void setCourse(Course course) {
		this.course = course;
	}

	/**
	 * @return True if more lectures available, otherwise false.
	 */
	public boolean decreaseRemainingNumberOfLectures() {
		--remainingNumberOfLectures;
		if (0 == remainingNumberOfLectures) {
			return false;
		} else {
			return true;
		}
	}
}
